#!/usr/bin/python
# -*- coding: utf-8 -*-
# 当然 这个 并不是云片
import requests


class Yunpian:
    def __init__(self,api_key):
        self.api_key = api_key
        self.single_send_url = "http://utf8.api.smschinese.cn/"

    def send_sms(self,code,mobile):
        parmas = {
            'Uid':'hale',
            'Key':self.api_key,
            'smsMob':mobile,
            'smsText':'这次的验证码是'+code + '  如非本人操作，请忽略'
        }
        response = requests.post(url=self.single_send_url,data=parmas).text
        return response


if __name__ == "__main__":
    y = Yunpian('fc076a5c49ff9ceb71ed')
    r = y.send_sms('2333','18242095060')
    print(r)
